package com.hzit.oss.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Configuration
@ConfigurationProperties(prefix = "oss")
@Data
public class OssProperties implements InitializingBean {
	private String endpoint;
	private String accesskey;
	private String accessSecret;
	private String bucketName;
	public static String ENDPOINT;
	public static String ACCESSKEY;
	public static String ACCESSSECRET;
	public static String BUCKETNAME;

	@Override
	public void afterPropertiesSet() throws Exception {
		ENDPOINT = endpoint;
		ACCESSKEY = accesskey;
		ACCESSSECRET = accessSecret;
		BUCKETNAME = bucketName;
	}
}
